﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;

namespace Domain
{
    public class UserInfo
    {
        public virtual int ID { get; set; }

        [Required(ErrorMessage = "请输入用户名")]
        public virtual string Name { get; set; }
        [Required(ErrorMessage = "请输入密码")]
        public virtual string Password { get; set; }
        [Required(ErrorMessage = "请确认密码")]
        //[("Password", ErrorMessage = "密码必须一致")]
        public virtual string RepeatPassword { get; set; }
        public virtual string Gender { get; set; }
        [Required(ErrorMessage = "请输入邮箱地址")]
        [RegularExpression(@"\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*",ErrorMessage = "邮箱地址格式不正确")]
        public virtual string Email { get; set; }
        public virtual string Mobile { get; set; }
        public virtual string Image { get; set; }
        public virtual DateTime RegistData { get; set; }
        public virtual Guid VerifyCode { get; set; }
        public virtual bool Activate { get; set; }

        public virtual string NoteBookSort { get; set; }

        public virtual Role Role { get; set; }
        //public virtual IList<NoteBook> NoteBooks { get; set; }
    }
}
